/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ua.epam.muzalevskiy.third_project.knife;

import java.util.Comparator;

/**
 * This class describe how to compare <code> Knife </code> type values.
 *
 * @author Muzalevskiy Vitaliy
 */
public class KnifeComparator implements Comparator<Knife> {

    @Override
    public int compare(Knife o1, Knife o2) {
        if(o1 == null || o2 == null){
            throw new RuntimeException();
        } else {
            return o1.getId().compareTo(o2.getId());
        }       
    }
          
   
}
